home *** CD-ROM | disk | FTP | other *** search
- 'TSTAVAIL.ASC / Test Program for CSS Available Disk Space Routine
- '(c) COPYRIGHT Cyberphilia Software Solutions, New York, NY 1986.
- '
- 'Parameters: DRV% ....... drive specifier
- ' CLAVAIL% ... available clusters
- ' CLSIZE% .... bytes per cluster
- '
- '
- 'CALLing Considerations:
- '
- 'From BASIC ... CALL CSSAVAIL(DRV%,CLAVAIL%,CLSIZE%)
- '
- ' Where ... DRV% is 0 for default, 1 for A, 2 for B, etc.
- ' CLAVAIL% is initialized to 0 before call
- ' CLSIZE% is initialized to 0 before call
- '
- '
- 'CALL Return Considerations:
- '
- ' DRV% will be set to FFFFh if drive specified is invalid
- '
- ' To determine number of bytes available on specified drive
- ' simply multiply CLAVAIL% by CLSIZE%.
- '
- ' All numeric parameters passed to an assembly language routine
- ' from BASIC must be in integer format. Either execute a
- ' DEFINT at the top of your BASIC program or suffix the numeric
- ' variables with '%'.
- '
- ' Since the result of the multiplication will probably exceed the
- ' 32767 limit of integers make sure you place each returned value
- ' of the call into a double precision number, for example:
- '
- ' CLAVAIL# = CLAVAIL%
- ' CLSIZE# = CLSIZE%
- ' BYTES.LEFT# = CLAVAIL# * CLSIZE#
- '
- ' - Or -
- '
- ' BYTES.LEFT# = CLAVAIL%
- ' BYTES.LEFT# = BYTES.LEFT# * CLSIZE%
- '
- '
- ' Do not try BYTES.LEFT# = CLAVAIL% * CLSIZE% since BASIC
- ' computes from right to left, you will receive an OVERFLOW
- ' error before it gets to place the result into BYTES.LEFT#
- '
- '
- DRV% = 3
- CLAVAIL% = 0
- CLSIZE% = 0
- '
- CALL CSSAVAIL(DRV%,CLAVAIL%,CLSIZE%)
- '
- BYTES.LEFT# = CLAVAIL%
- BYTES.LEFT# = BYTES.LEFT# * CLSIZE%
- '
- CLS
- PRINT "Number of bytes available on drive C: ... ";BYTES.LEFT#
- '
- END